import { constantRoutes } from '@/router'

export default {
  namespaced: true, // 开启命名空间
  state: {
    menuList: []
  },
  mutations: {
    // 把动态的路由存储到vuex里面
    setMenus(state, payload) {
      // 静态路由和动态路由合并到一起存储到vuex里面
      state.menuList = [...constantRoutes, ...payload]
    }
  }
}
